package com.anytrek.cloudcommodity.service;

import com.anytrek.cloudcommon.entity.CommodityEntity;
import com.anytrek.cloudcommon.utils.ApiResult;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author Alex2
 * @description 针对表【t_commodity】的数据库操作Service
 * @createDate 2025-08-22 10:48:54
 */
public interface CommodityService extends IService<CommodityEntity> {

    ApiResult insertCommodity(String name, Integer price, Integer stock);

    ApiResult getPriceByCommodityId(Integer commodityId);

    ApiResult deductStock(Integer commodityId, Integer count);
}
